#pragma once
#include "Enums.h"
#include "Treasure.h"
namespace Model{
	class Tile
{
protected:
	/*
	* When the tile has orientation midi ( midday) then
	exit 1 = north
	exit 2 = East
	exit 3 = South
	exit 4 = West
	if orientation = quart ( quarter) then 
	exit 1 = East
	exit 2 = South
	exit 3 = West
	exit 4 = North 
	And so on.
	*/
	Orientation ori;
	bool exit1,exit2,exit3,exit4;
	Treasure* myTreasure;
	Tile *neighbor1,*neighbor2,*neighbor3,*neighbor4;
public:
	void setLeftNeighbor(Tile* t);
	void setRightNeighbor(Tile* t);
	void setUpNeighbor(Tile* t);
	void setDownNeighbor(Tile* t);
	virtual bool canGoUp();
	virtual bool canGoDown();
	virtual bool canGoLeft();
	virtual bool canGoRight();
	virtual Treasure* getTreasure();
	virtual void setTreasure(Treasure* t);
	virtual Tile* upNeighbor();
	virtual Tile* downNeighbor();
	virtual Tile* leftNeighbor();
	virtual Tile* rightNeighbor();
	Tile* clone();
	Tile(Tile& t);
	Tile(bool exit1,bool exit2,bool exit3,bool exit4,Orientation ori=midday);
	Tile(Treasure* tr,bool exit1,bool exit2,bool exit3,bool exit4,Orientation ori=midday);
	~Tile(void);
};
}
